From: Mario Sanchez Prada Date: Fri, 11 Aug 2017 09:04:37 +0000 (+0200) Subject: Explicitly set the width and height for subicons' containers in folders X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~141 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=d903978937499a365d5d8586b83eb7323b21efd0;p=gnome-shell.git Explicitly set the width and height for subicons' containers in folders Otherwise the smaller icons will try to take too much space since the texture rendering the icons will be scaled up on HiDPI displays according to the scale factor, which will push the size of the StBin containing the texture up, causing them to completely fill the folder's total space. Explicitly setting the size of the StBin container in this case, in a similar fashion to what we do when creating the empty placeholders (in case where there are less than 4 apps in a folder), ensures that each "cell" of the grid-like widget representing the folder does not take too much space. https://bugzilla.gnome.org/show_bug.cgi?id=786145 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 1cb830372..428b3c062 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1172,13 +1172,9 @@ var FolderView = new Lang.Class({ let numItems = this._allItems.length; let rtl = icon.get_text_direction() == Clutter.TextDirection.RTL; for (let i = 0; i < 4; i++) { - let bin; - if (i < numItems) { - let texture = this._allItems[i].app.create_icon_texture(subSize); - bin = new St.Bin({ child: texture }); - } else { - bin = new St.Bin({ width: subSize, height: subSize }); - } + let bin = new St.Bin({ width: subSize, height: subSize }); + if (i < numItems) + bin.child = this._allItems[i].app.create_icon_texture(subSize); layout.attach(bin, rtl ? (i + 1) % 2 : i % 2, Math.floor(i / 2), 1, 1); }